package net.xju_13_14.advice;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

@Component
public class XmlAdvice {

    public void before() {
        System.out.println("前置通知");
    }

    public void after() {
        System.out.println("后置通知");
    }
    public void afterReturning() {
        System.out.println("返回通知");
    }

    public void afterThrowing() {
        System.out.println("异常通知");
    }
    public Object around(ProceedingJoinPoint point) throws Throwable {
        System.out.println("方法前");
        Object proceed = point.proceed();
        System.out.println("方法后");
        return proceed;
    }

}
